import axios from './axios';

export const getTopics = () => {
    return axios.get('/topics');
}

export const getTopic = (id) => {
    return axios.get('/topic/' + id);
}

export const createTopic = (data) => {
    return axios.post('/topics', data);
}

export const getCollect = (loginname) => {
    return axios.get('/topic_collect/' + loginname);
}

export const createCollect = (data) => {
    return axios.post('/topic_collect/collect', data);
}

export const delCollect = (data) => {
    return axios.post('/topic_collect/de_collect', data);
}

export const getUser = (loginname) => {
    return axios.get('/user/' + loginname);
}

